package cc.rengu.redp.bizimpl.upmp.controller;

import cc.rengu.redp.bizimpl.upmp.domain.UpmpOrganization;
import cc.rengu.redp.bizimpl.upmp.service.IUpmpOrganizationService;
import cc.rengu.redp.common.controller.BaseController;
import cc.rengu.redp.common.domain.QueryRequest;
import io.swagger.annotations.ApiImplicitParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 机构的控制类
 *
 * @author hh
 * @date 2017年5月25日 下午6:21:22
 */
@RestController
@RequestMapping(value = "/admin/merParam/UpmpOrganization")
public class UpmpOrganizationsController extends BaseController {

	@Autowired
	private IUpmpOrganizationService organizationService;

	@RequestMapping(value = "/organizationSelect2List", method = RequestMethod.GET)
//	@ApiImplicitParam(paramType = "query", name = "q", value = "条件",  dataType = "String")
	public Map<String, Object> agentmanageorgSelect2List(QueryRequest request , UpmpOrganization upmp) {
		return organizationService.organizationSelect2List(request,upmp);
	}
	//超级管理员发人行必填
	@RequestMapping(value = "/instIdOrganizationSelect2List", method = RequestMethod.GET)
	@ApiImplicitParam(paramType = "query", name = "q", value = "条件",  dataType = "String")
	public Map<String, Object> instIdOrganizationSelect2List(QueryRequest request ,UpmpOrganization q) {
		return organizationService.organizationSelect2List(request,q);
	}

	@RequestMapping(value = "/orgoneSelect2List", method = RequestMethod.GET)
	@ApiImplicitParam(paramType = "query", name = "q", value = "条件",  dataType = "String")
	public Map<String, Object> orgoneSelect2List(QueryRequest request , String q) {
		return organizationService.orgoneSelect2List(request,q);
	}


	@RequestMapping(value = "/organizationSelectList", method = RequestMethod.GET)
	public Map<String, Object> organizationSelectList(QueryRequest request , UpmpOrganization organization) {
		return organizationService.organizationSelectList(request,organization);
	}

}
